#pragma once

class CForA
{
public:
    explicit CForA(int val = 0);
    ~CForA() = default;
    CForA(const CForA& rhs);

public:
    int m;
};

template<typename T, size_t N>
class CForB
{
public:
    CForB();
    ~CForB() = default;

public:
    T* begin();
    T* end();

private:
    T m_elements[N];
};

template<typename T, size_t N>
CForB<T, N>::CForB()
{
    for (size_t i = 0; i < N; ++i) {
        m_elements[i] = (T)i + 1;
    }
}

template<typename T, size_t N>
T* CForB<T, N>::begin()
{
    return m_elements + 0;
}

template<typename T, size_t N>
T* CForB<T, N>::end()
{
    return m_elements + N;
}
